package com.lm.domain;


import cn.hutool.core.clone.CloneRuntimeException;
import cn.hutool.core.clone.Cloneable;
import lombok.Data;

import java.util.List;

/**
 * @Auther: Min.Liu
 * @Description:
 * @Date: Created in 10:00 2024/9/26
 */
@Data
public class User implements Cloneable {
    private String username;
    private int age;

    @Override
    public User clone() {
        try {
            return (User) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new CloneRuntimeException(e);
        }
    }


    public void add(List<Object> list, Object obj){
        list.add(obj);
    }
}
//@Data
//public class User extends CloneSupport<User> {
//    private String username;
//    private int age;
//
//    public static User create() {
//        return new User();
//    }
//
//    public static User create2(String s) {
//        System.out.println(s);
//        return new User();
//    }
//}
